Part Number Hot Search : 
AI3D13G FDN371 1N3673A DCMO501 PE6832 00144 2SD2004 AKD4651
Product Description
Full Text Search
 

To Download H8536 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  hp 64739 h8/536 emulator pc interface user?s guide hp part no. 64739-97004 printed in u.s.a. february 1994 edition 2

notice hewlett-packard makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. hewlett-packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material. hewlett-packard assumes no responsibility for the use or reliability of its software on equipment that is not furnished by hewlett-packard. ? copyright 1994, hewlett-packard company. this document contains proprietary information, which is protected by copyright. all rights are reserved. no part of this document may be photocopied, reproduced or translated to another language without the prior written consent of hewlett-packard company. the information contained in this document is subject to change without notice. ms-dos is a trademark of microsoft corporation. unix is a registered trademark of at&t. torx is a registered trademark of camcar division of textron, inc. hewlett-packard company p.o.box 2197 1900 garden of the gods road colorado springs, co 80901-2197, u.s.a . restricted rights legend use, duplication, or disclosure by the u.s. government is subject to restrictions set forth in subparagraph (c) (1) (ii) of the rights in technical data and computer software clause at dfars 252.227-7013. hewlett-packard company, 3000 hanover street, palo alto, ca 94304
printing history new editions are complete revisions of the manual. the date on the title page changes only when a new edition is published. a software code may be printed before the date; this indicates the version level of the software product at the time the manual was issued. many product updates and fixes do not require manual changes, and manual corrections may be done without accompanying product changes. therefore, do not expect a one-to-one correspondence between product updates and manual revisions. edition 1 64739-97001, february 1990 edition 2 64739-97004, february 1994
using this manual this manual introduces you to the following emulators as used with the pc interface. hp 64739a h8/536 emulator hp 64739b h8/536s emulator throughout this documentation, the following names are used to denote the microprocessors listed in the following table of supported microprocessors. model supported microprocessors reffered to as hp 64739a(h8/536 emulator) hd6475368cp hd6435368cp hd6475348cp hd6435348cp h8/536 h8/536 h8/534 h8/534 hp 64739b(h8/536s emulator) hd6475368cp hd6435368cp hd6475348cp hd6435348cp hd6475368scp hd6435368scp hd6475348scp hd6435348scp h8/536 h8/536 h8/534 h8/534 h8/536s h8/536s h8/534s h8/534s for the most part, the h8/536 and h8/536s emulators all operate the same way. differences of between the emulators are described where they exist. both the h8/536 and h8/536s emulators will be referred to as the "h8/536 emulator". in the specific instances where h8/536s emulator differs from h8/536 emulator, it will be described as "h8/536s emulator".
this manual will: show you how to use emulation commands by executing them on a sample program and describing their results. show you how to configure the emulator for your development needs. topics include: restricting the emulator to real-time execution, and selecting a target system clock source. show you how to use the emulator in-circuit (connected to a target system). describe the command syntax which is specific to the h8/536 emulator. this manual does not: show you how to use every pc interface command and option; the pc interface is described in the hp 64700 emulators pc interface: user?s reference.
organization chapter 1 introduction to the h8/536 emulator. this chapter lists the h8/536 emulator features and describes how they can help you in developing new hardware and software. chapter 2 getting started. this chapter shows you how to use emulation commands by executing them on a sample program. this chapter describes the sample program and how to use basic emulation commands. chapter 3 in-circuit emulation. this chapter shows you how to plug the emulator into a target system, and how to use the "in-circuit" emulation features. chapter 4 configuring the emulator. you can configure the emulator to adapt it to your specific development needs. this chapter describes the options available when configuring the emulator and how to save and restore particular configurations. chapter 5 using the emulator. this chapter describes emulation topics which are not covered in the "getting started" chapter (for example, coordinated measurements and storing memory). appendix a file format readers. this appendix describes how to use the hp 64869 format reader from ms-dos, load absolute files into the emulator, use global and local symbols with the pc interface.
notes
contents 1 introduction to the h8/536 emulator introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 purpose of the h8/536 emulator . . . . . . . . . . . . . . . . . . . 1-1 features of the h8/536 emulator . . . . . . . . . . . . . . . . . . . 1-3 supported microprocessors . . . . . . . . . . . . . . . . . . . . 1-3 clock speeds . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3 emulation memory . . . . . . . . . . . . . . . . . . . . . . . . 1-4 analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 single-step . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 target system interface . . . . . . . . . . . . . . . . . . . . . . 1-5 breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5 reset support . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6 real-time operation . . . . . . . . . . . . . . . . . . . . . . . 1-6 limitations, restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6 dma support . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6 sleep and software stand-by mode . . . . . . . . . . . . . . . . 1-6 watch dog timer in background . . . . . . . . . . . . . . . . . 1-6 ram enable bit . . . . . . . . . . . . . . . . . . . . . . . . . . 1-6 2 getting started introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 a look at the sample program . . . . . . . . . . . . . . . . . . 2-2 sample program assembly . . . . . . . . . . . . . . . . . . . . 2-6 linking the sample program . . . . . . . . . . . . . . . . . . . 2-6 starting up the pc interface . . . . . . . . . . . . . . . . . . . . . 2-7 selecting pc interface commands . . . . . . . . . . . . . . . . 2-8 emulator status . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8 modifying configuration . . . . . . . . . . . . . . . . . . . . . . . 2-8 defining the reset value for the stack pointer . . . . . . . . . . 2-8 selecting your processor . . . . . . . . . . . . . . . . . . . . . 2-8 contents-11
saving the configuration . . . . . . . . . . . . . . . . . . . . . 2-9 mapping memory . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 which memory locations should be mapped? . . . . . . . . . 2-9 loading programs into memory . . . . . . . . . . . . . . . . . . 2-12 file format . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12 memory type . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13 force absolute file read . . . . . . . . . . . . . . . . . . . . 2-13 absolute file name . . . . . . . . . . . . . . . . . . . . . . . 2-13 using symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14 displaying global symbols . . . . . . . . . . . . . . . . . . . 2-14 displaying local symbols . . . . . . . . . . . . . . . . . . . 2-15 transfer symbols to the emulator . . . . . . . . . . . . . . . 2-17 displaying memory in mnemonic format . . . . . . . . . . . . . 2-18 stepping through the program . . . . . . . . . . . . . . . . . . . 2-19 specifying a step count . . . . . . . . . . . . . . . . . . . . . 2-20 modifying memory . . . . . . . . . . . . . . . . . . . . . . . . . 2-21 running the program . . . . . . . . . . . . . . . . . . . . . . . . 2-22 searching memory for data . . . . . . . . . . . . . . . . . . . . 2-23 breaking into the monitor . . . . . . . . . . . . . . . . . . . . . 2-23 using software breakpoints . . . . . . . . . . . . . . . . . . . . 2-24 defining a software breakpoint . . . . . . . . . . . . . . . . 2-25 displaying software breakpoints . . . . . . . . . . . . . . . . 2-26 setting a software breakpoint . . . . . . . . . . . . . . . . . 2-26 clearing a software breakpoint . . . . . . . . . . . . . . . . . 2-26 using the analyzer . . . . . . . . . . . . . . . . . . . . . . . . . 2-27 resetting the analysis specification . . . . . . . . . . . . . . 2-27 specifying a simple trigger . . . . . . . . . . . . . . . . . . 2-27 starting the trace . . . . . . . . . . . . . . . . . . . . . . . . 2-31 displaying the trace . . . . . . . . . . . . . . . . . . . . . . 2-31 for a complete description . . . . . . . . . . . . . . . . . . . 2-33 using a command file . . . . . . . . . . . . . . . . . . . . . . . 2-33 resetting the emulator . . . . . . . . . . . . . . . . . . . . . . . 2-34 exiting the pc interface . . . . . . . . . . . . . . . . . . . . . . 2-35 3 in-circuit emulation prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 installing the target system probe . . . . . . . . . . . . . . . . . . 3-2 installing into a plcc type socket . . . . . . . . . . . . . . . . . 3-3 running the emulator from target reset . . . . . . . . . . . . . . 3-4 4 configuring the emulator 12-contents
introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 accessing the emulator configuration options . . . . . . . . . . . 4-2 internal emulator clock? . . . . . . . . . . . . . . . . . . . . . . . 4-3 enable real-time mode? . . . . . . . . . . . . . . . . . . . . . . 4-3 enable breaks on writes to rom? . . . . . . . . . . . . . . . . . . 4-5 enable software breakpoints? . . . . . . . . . . . . . . . . . . . . 4-6 enable cmb interaction? . . . . . . . . . . . . . . . . . . . . . . . 4-7 enable bus arbitration? . . . . . . . . . . . . . . . . . . . . . . . 4-8 drive background cycles to target? . . . . . . . . . . . . . . . . . 4-9 enable nmi input from target? . . . . . . . . . . . . . . . . . . 4-10 enable /res input from target? . . . . . . . . . . . . . . . . . . 4-11 drive emulation reset to target? . . . . . . . . . . . . . . . . . 4-12 trace bus release cycles? . . . . . . . . . . . . . . . . . . . . . 4-12 processor type . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 processor operation mode . . . . . . . . . . . . . . . . . . . . . 4-13 monitor type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14 foreground monitor address . . . . . . . . . . . . . . . . . . . . 4-15 reset value for stack pointer? . . . . . . . . . . . . . . . . . . . 4-16 storing an emulator configuration . . . . . . . . . . . . . . . . . 4-17 loading an emulator configuration . . . . . . . . . . . . . . . . 4-17 5 using the emulator introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 making coordinated measurements . . . . . . . . . . . . . . . . . 5-2 running the emulator at /execute . . . . . . . . . . . . . . . 5-3 breaking on the analyzer trigger . . . . . . . . . . . . . . . . 5-3 storing memory contents to an absolute file . . . . . . . . . . . . 5-5 accessing target system with e clock synchronous instruction . . 5-5 register names and classes . . . . . . . . . . . . . . . . . . . . . 5-6 summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 * (basic) class . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 sys class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 intc class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 dtc class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7 port class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8 frt1 class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8 frt2 class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 frt3 class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 tmr class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 pwm1 class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 pwm2 class . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 contents-13
pwm3 class . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 wdt class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 sci1 class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10 sci2 class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11 adc class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11 a file format readers using the hp 64000 reader . . . . . . . . . . . . . . . . . . . . . a-1 what the reader accomplishes . . . . . . . . . . . . . . . . . . a-1 location of the hp 64000 reader program . . . . . . . . . . . . a-3 using the reader from ms-dos . . . . . . . . . . . . . . . . . a-3 using the reader from the pc interface . . . . . . . . . . . . . a-4 if the reader won?t run . . . . . . . . . . . . . . . . . . . . . a-5 including rhp64000 in a make file . . . . . . . . . . . . . . . a-5 using the hp 64869 reader . . . . . . . . . . . . . . . . . . . . . a-6 what the reader accomplishes . . . . . . . . . . . . . . . . . . a-6 location of the hp 64869 reader program . . . . . . . . . . . . a-8 using the hp 64869 reader from ms-dos . . . . . . . . . . . a-8 using the hp 64869 reader from the pc interface . . . . . . . . a-8 if the reader won?t run . . . . . . . . . . . . . . . . . . . . a-10 including rd64869 in a make file . . . . . . . . . . . . . . . a-10 illustrations figure 1-1. hp 64739 emulator for the h8/536 processor . . . . . 1-2 figure 2-1. sample program listing . . . . . . . . . . . . . . . . . 2-3 figure 2-2. linkage editor subcommand file . . . . . . . . . . . . 2-6 figure 2-3. pc interface display . . . . . . . . . . . . . . . . . . . 2-7 figure 2-4. sample program load map listing . . . . . . . . . . 2-10 figure 2-5. memory configuration display . . . . . . . . . . . . 2-11 figure 2-6. modifying the trace specification . . . . . . . . . . 2-30 figure 2-7. modifying the pattern specification . . . . . . . . . . 2-30 figure 3-1. installing into a plcc type socket . . . . . . . . . . . 3-3 figure 4-1. h8/536 general emulator configuration . . . . . . . . 4-2 figure 5-1. cross trigger configuration . . . . . . . . . . . . . . . 5-4 14-contents
tables table 1-1. supported microprocessors . . . . . . . . . . . . . . . . 1-3 table 1-2. clock speeds . . . . . . . . . . . . . . . . . . . . . . . 1-4 contents-15
notes 16-contents
1 introduction to the h8/536 emulator introduction the topics in this chapter include: purpose of the h8/536 emulator. features of the h8/536 emulator. purpose of the h8/536 emulator the h8/536 emulator is designed to replace the h8/536 microprocessor in your target system to help you debug/integrate target system software and hardware. the emulator performs just like the processor which it replaces, but at the same time, it gives you information about the bus cycle operation of the processor. the emulator gives you control over target system execution and allows you to view or modify the contents of processor registers, target system memory. introduction 1-17
figure 1-1. hp 64739 emulator for the h8/536 processor 1-18 introduction
features of the h8/536 emulator this section introduces you to the features of the emulator. the chapters which follow show you how to use these features. supported microprocessors the h8/536 emulator supports the microprocessors listed in table 1-1. table 1-1. supported microprocessors model supported microprocessors reffered to as hp 64739a(h8/536 emulator) hd6475368cp hd6435368cp hd6475348cp hd6435348cp h8/536 h8/536 h8/534 h8/534 hp 64739b(h8/536s emulator) hd6475368cp hd6435368cp hd6475348cp hd6435348cp hd6475368scp hd6435368scp hd6475348scp hd6435348scp h8/536 h8/536 h8/534 h8/534 h8/536s h8/536s h8/534s h8/534s clock speeds you can select whether the emulator will be clocked by the internal clock source or by the external clock source on your target system. you must use a clock input conforming to the specification of table 1-2. when you use an external crystal, you need to input conforming to the specification of microprocessor. introduction 1-19
table 1-2. clock speeds clock source model microprocessor clock speed internal hp 64739a (h8/536 emulator) h8/536 h8/534 10mhz (system clock) hp 64739b (h8/536s emulator) h8/536 h8/534 h8/536s h8/534s 10mhz (system clock) external hp 64739a (h8/536 emulator) h8/536 h8/534 from 0.5 up to 10mhz (system clock) hp 64739b (h8/536s emulator) h8/536 h8/534 from 0.5 up to 10mhz (system clock) h8/536s h8/534s from 0.5 up to 16mhz (system clock) emulation memory the h8/536 emulator is used with one of the following emulation memory cards. hp 64726a 128k byte emulation memory card hp 64727a 512k byte emulation memory card hp 64728a 1m byte emulation memory card you can define up to 16 memory ranges (at 256 byte boundaries and least 256 byte in length.) the emulator occupies 2k byte, which is used for monitor program, leaving 126k, 510k, 1022k byte of emulation memory which you may use. you can characterize memory range as emulation ram (eram), emulation rom (erom), target system ram (tram), target system rom (trom), or guarded memory (grd). the emulator generates an error message when accesses are made to guarded memory locations. you can also configure the emulator so that writes to memory defined as rom cause emulator execution to break out of target program execution. 1-20 introduction
analysis the h8/536 emulator is used with one of the following analyzers which allows you to trace code execution and processor activity. hp 64704a 80-channel emulation bus analyzer hp 64703a 64-channel emulation bus analyzer and 16-channel state/timing analyzer. hp 64794x 80-channel 8k/64k/256k emulation bus analyzer. the emulation bus analyzer monitors the emulation processor using an internal analysis bus. the hp 64703a 64-channel emulation bus analyzer and 16-channel state/timing analyzer allows you to probe up to 16 different lines in your target system. registers you can display or modify the h8/536 internal register contents. this includes the ability to modify the program counter (pc) and code page register (cp) so you can control where the emulator begins executing a target system program. single-step you can direct the emulation processor to execute a single instruction or a specified number of instructions. target system interface you can set the interface to the target system to be active or passive during background monitor operation. (see the "configuring the emulator" chapter for further details.) breakpoints you can set up the emulator/analyzer interaction so that when the analyzer finds a specific state, emulator execution will break to the background monitor. you can also define software breakpoints in your program. the emulator uses one of h8/536 undefined opcode (1b hex) as software breakpoint interrupt instruction. when you define a software breakpoint, the emulator places the breakpoint interrupt instruction (1b hex) at the specified address; after the breakpoint interrupt instruction causes emulator execution to break out of your program, the emulator replaces the original opcode. refer to the "using software breakpoints" section of "getting started" chapter for more information. introduction 1-21
reset support the emulator can be reset from the emulation system under your control; or your target system can reset the emulation processor. real-time operation real-time signifies continuous execution of your program without interference from the emulator. (such interference occurs when the emulator temporarily breaks into the monitor so that it can access register contents or target system memory.) emulator features performed in real time include: running and analyzer tracing. emulator features not performed in real time include: display or modify of target system memory; load/dump of any memory, display or modification of registers, and single step. limitations, restrictions dma support direct memory access to h8/536 emulation memory is not permitted. sleep and software stand-by mode when the emulator breaks into the emulation monitor, h8/536 microprocessor sleep or software stand-by mode is released and comes to normal processor mode. watch dog timer in background watch dog timer suspends count up while the emulator is running in background monitor. ram enable bit the internal ram of h8/536 processor can be enabled/disabled by rame (ram enable bit). however, once you map the internal ram area to emulation ram, the emulator accesses emulation ram even if the internal ram is disabled by rame. 1-22 introduction
2 getting started introduction this chapter leads you through a basic, step by step tutorial that shows how to use the hp 64739 emulator with the pc interface. this chapter will: tell you what must be done before you can use the emulator as shown in the tutorial examples. describe the sample program used for this chapter?s examples. briefly describe how pc interface commands are entered and how emulator status is displayed. this chapter will show you how to: start up the pc interface from the ms-dos prompt. define (map) emulation and target system memory. load programs into emulation and target system memory. enter emulation commands to view execution of the sample program. getting started 2-23
before you begin prerequisites before beginning the tutorial presented in this chapter, you must have completed the following tasks: 1. connected the emulator to your computer. the hp 64700 emulators: hardware installation and configuration manual shows you how to do this. 2. installed the pc interface software on your computer. software installation instructions are shipped with the media containing the pc interface software. the hp 64700 emulators pc interface: user?s reference manual contains additional information on the installation and setup of the pc interface. 3. in addition, it is recommended, although not required, that you read and understand the concepts of emulation presented in the hp 64700 emulators: system overview manual. the system overview also covers hp 64700 series system architecture. a brief understanding of these concepts may help avoid questions later. you should read the hp 64700 emulators pc interface: user?s reference manual to learn how to use the pc interface in general. for the most part, this manual contains information specific to the h8/536 emulator. a look at the sample program the sample program used in this chapter is listed in figure 2-1. the program is a primitive command interpreter. using the various features of the emulator, we will show you how to load this program into emulation memory, execute it, monitor the program?s operation with the analyzer, and simulate entry of different commands by using the " m emory m odify" emulation command. 2-24 getting started
.global init,msgs,cmd_input .global msg_dest .section table,data msgs msg_a .sdata "command a entered " msg_b .sdata "entered b command " msg_i .sdata "invalid command " end_msgs .section prog,code ;*********************************************** ;* sets up the stack pointer. ;*********************************************** init mov:g.w #stack,r7 ;*********************************************** ;* clear previous command. ;*********************************************** read_cmd mov:g.b #0,@cmd_input ;*********************************************** ;* read command input byte. if no command has ;* been entered, continue to scan for input. ;*********************************************** scan mov:g.b @cmd_input,r0 beq scan ;*********************************************** ;* a command has been entered. check if it is ;* command a, command b, or invalid. ;*********************************************** exe_cmd cmp:e.b #h?41,r0 beq cmd_a cmp:e.b #h?42,r0 beq cmd_b bra cmd_i ;*********************************************** ;* command a is entered. r1 = the number of ;* bytes in message a. r4 = location of the ;* message. jump to the routine which writes ;* the messages. ;*********************************************** cmd_a mov:i.w #msg_b-msg_a-1,r1 mov:i.w #msg_a,r4 bra write_msg ;*********************************************** ;* command b is entered. ;*********************************************** cmd_b mov:i.w #msg_i-msg_b-1,r1 mov:i.w #msg_b,r4 bra write_msg figure 2-2. sample program listing getting started 2-25
data declarations the "table" section defines the messages used by the program to respond to various command inputs. these messages are labeled msg_a, msg_b, and msg_i . ;*********************************************** ;* an invalid command is entered. ;*********************************************** cmd_i mov:i.w #end_msgs-msg_i-1,r1 mov:i.w #msg_i,r4 ;*********************************************** ;* message is written to the destination. ;*********************************************** write_msg mov:i.w #msg_dest,r5 again mov:g.b @r4+,r3 mov:g.b r3,@r5+ scb/eq r1,again ;*********************************************** ;* the rest of the destination area is filled ;* with zeros. ;*********************************************** fill_dest mov:g.b #0,@r5+ cmp:i.w #msg_dest+h?20,r5 bne fill_dest ;*********************************************** ;* go back and scan for next command. ;*********************************************** bra read_cmd .section data,common ;*********************************************** ;* command input byte. ;*********************************************** cmd_input .res.b 1 .res.b 1 ;*********************************************** ;* destination of the command messages. ;*********************************************** msg_dest .res.w h?3e stack .res.w 1 ; stack area. figure 2-1. sample program listing (cont?d) 2-26 getting started
initialization the program instruction at the init label initializes the stack pointer. reading input the instruction at the read_cmd label clears any random data or previous commands from the cmd_input byte. the scan loop continually reads the cmd_input byte to see if a command is entered (a value other than 0 hex). processing commands when a command is entered, the instructions from exe_cmd to cmd_a determine whether the command was "a", "b", or an invalid command. if the command input byte is "a" (ascii 41 hex), execution is transferred to the instructions at cmd_a . if the command input byte is "b" (ascii 42 hex), execution is transferred to the instructions at cmd_b . if the command input byte is neither "a" nor "b", an invalid command has been entered, and execution is transferred to the instructions at cmd_i . the instructions at cmd_a, cmd_b, and cmd_i each load register r1 with the length of the message to be displayed and register r4 with the starting location of the appropriate message. then, execution transfers to write_msg which writes the appropriate message to the destination location, msg_dest . after the message is written, the instructions at fill_dest fill the remaining destination locations with zeros. (the entire destination area is 20 hex bytes long.) then, the program branches back to read the next command. getting started 2-27
sample program assembly the sample program is written for and assembled with the hp 64869 h8/500 assembler/linkage editor. for example, the following command was used to assemble the sample program. c> h8asm cmd_rds.src /debug in addition to the assembler listing (cmd_rds.lis), the "cmd_rds.obj" relocatable file is created. linking the sample program the sample program can be linked with following command and generates an absolute file. the contents of "cmd_rds.k" linkage editor subcommand file is shown in figure 2-2. c> h8lnk /subcommand=cmd_rds.k in addition to the linker load map listing (cmd_rds.map), the "cmd_rds.abs" absolute file is created. note you need to specify debug command line option to both assembler and linker command to generate local symbol information. the debug option for the assembler and linker direct to include local symbol information to the object file. debug input cmd_rds start prog(1000),table(1100),data(0fc00) print cmd_rds output cmd_rds exit figure 2-2. linkage editor subcommand file 2-28 getting started
starting up the pc interface if you have set up the emulator device table and the hptables shell environment variable as shown in the hp 64700 emulators pc interface: user?s reference , you can start up the h8/536 pc interface by entering the following command from the ms-dos prompt: pcH8536 in the command above, pcH8536 is the command to start the pc interface; "" is the logical emulator name given in the emulator device table. (to start version of the pc interface that supports external timing analysys, substitute ptH8536 for pcH8536 in this command.) if this command is successful, you will see the display shown in figure 2-3. if this command is not successful, you will be given an error message and returned to the ms-dos prompt. figure 2-3. pc interface display getting started 2-29
selecting pc interface commands this manual will tell you to "select" commands. you can select commands or command options by either using the left and right arrow keys to highlight the option and press the enter key, or you can simply type the first letter of that option. if you select the wrong option, you can press the esc key to move back up the command tree. when a command or command option is highlighted, a short message describing that option is shown on the bottom line of the display. emulator status the status of the emulator is shown on the line above the command options. the pc interface periodically checks the status of the emulator and updates the status line. modifying configuration you need to set up the emulation configuration before using the sample program. to access the emulation configuration display, enter: c onfig, g eneral defining the reset value for the stack pointer even though the h8/536 emulator has a background monitor, it requires you to define a stack pointer. use the arrow keys to move the cursorto the "reset value for stack pointer" field, type 0fc80 and press enter . the stack pointer value will be set to the stack pointer (sp) on entrance to the emulation monitor initiated reset state (the "emulation reset" status). selecting your processor you need to select the processor you are going to emulate. use the arrow keys to move the cursor to the "processor type?" field. use the tab key to select the processor you are going to emulate. 2-30 getting started
saving the configuration to save the configuration, use the enter key to exit the field in the last field. (the end key on vectra keyboards moves the cursor directly to the last field.) mapping memory the h8/536 emulator contains 126 kilobytes of high-speed emulation memory (no wait states required) that can be mapped at a resolution of 256 bytes. the memory mapper allows you to characterize memory locations. it allows you specify whether a certain range of memory is present in the target system or whether you will be using emulation memory for that address range. you can also specify whether the target system memory is rom or ram, and you can specify that emulation memory be treated as rom or ram. you can include function code information with address ranges to further characterize the memory block. blocks of memory can also be characterized as guarded memory. guarded memory accesses will generate "break to monitor" requests. writes to rom will generate "break to monitor" requests if the "enable breaks on writes to rom?" configuration item is enabled (see the "configuring the emulator" chapter). the memory mapper allows you to define up to 16 different map terms. note when you use the h8/536 internal rom and ram, you must map memory space where internal rom and ram are located as each emulation rom and ram. which memory locations should be mapped? typically, assemblers generate relocatable files and linkers combine relocatable files to form the absolute file. the linker load map listing will show what locations your program will occupy in memory. a part of linker load map listing for the sample program (cmd_rds.map) is shown in figure 2-4. getting started 2-31
from the load map listing, you can see that the sample program occupies locations in three address ranges. the code area, which contains the opcodes and operands which make up the sample program, occupies locations 1000 hex through 1042 hex. the data area, which contains the ascii values of the messages the program displays, is occupies locations 1100 hex through 1133 hex. the destination area, which contains the command input byte and the locations of the message destination and the stack, occupies locations fc00 hex through fc7f hex. two mapper terms will be specified for the example program. since the program writes to the destination locations, the mapper block containing the destination locations should not be characterized as rom memory. to map memory for the sample program, select: c onfig, m ap, m odify *** linkage editor link map list *** section name start - end length unit name module name attribute : code noshr prog h?0000:1000 - h?0000:1042 h?00000043 cmd_rds cmd_rds * total address * h?0000:1000 - h?0000:1042 h?00000043 attribute : data noshr table h?0000:1100 - h?0000:1133 h?00000034 cmd_rds cmd_rds * total address * h?0000:1100 - h?0000:1133 h?00000034 attribute : data shr data h?0000:fc00 - h?0000:fc7f h?00000080 cmd_rds cmd_rds * total address * h?0000:fc00 - h?0000:fc7f h?00000080 figure 2-4. sample program load map listing 2-32 getting started
using the arrow keys, move the cursor to the "address range" field of term 1. enter: 1000..1fff move the cursor to the "memory type" field of term 1, and press the tab key to select the erom (emulation rom) type. move the cursor to the "address range" field of term 2 and enter: 0fc00..0fcff move the cursor to the "memory type" field of term 2, and press the tab key to select the eram (emulation ram) type. to save your memory map, use the enter key to exit the field in the lower right corner. (the end key on vectra keyboards moves the cursor directly to the last field.) the memory configuration display is shown in figure 2-5. figure 2-5. memory configuration display getting started 2-33
when mapping memory for your target system programs, you may wish to characterize emulation memory locations containing programs and constants (locations which should not be written to) as rom. this will prevent programs and constants from being written over accidentally, and will cause breaks when instructions attempt to do so. note the memory mapper re-assigns blocks of emulation memory after the insertion or deletion of mapper terms. for example, if you modified the contents of fc00 hex through fcff hex above, deleted term 1, and displayed locations fc00 hex through fcff hex, you would notice the contents of those locations are not the same as they were before deleting the mapper term. loading programs into memory if you have already assembled and linked the sample program, you can load the absolute file by selecting: m emory, l oad file format enter the format of your absolute file. the emulator will accept absolute files in the following formats: hp 64869 absolute. hp absolute. raw hp64000 absolute. intel hexadecimal. tektronix hexadecimal. motorola s-records. the hp 64869 absolute file is generated with hp 64869 h8/300 assembler/linkage editor. for this tutorial, choose the hp 64869 format. 2-34 getting started
hp 64869 format: when you load hp 64869 format files, the pc interface creates files (whose base names are the same as the absolute file) with the extensions ".hpa" and ".hps". the ".hpa" file is in a binary format that is compatible with the hp 64736 firmware. the ".hps" file is an ascii source file which contains the symbols to address mappings used by the pc interface. refer to "using hp 64869 format reader" section in appendix a for more information. hp64000 format: your language tool may generate raw hp64000 format absolute files (with extension .x, .l, .a). you can load these files by selecting "hp64000" or "raw hp64000" as file format. when you select "hp64000", the pc interface creates .hpa absolute file and .hps symbol database. when you select "raw hp64000", the pc interface doesn?t create these files. memory type the second field allows you to selectively load the portions of the absolute file which reside in emulation memory, target system memory, or both. since emulation memory is mapped for sample program locations, you can enter either "emulation" or "both". force absolute file read this option is only available for hp 64869 and hp64000 formats. it forces the file format readers to regenarate the emulator absolute file (.hpa) and symbol data base (.hps) before loading the code. normally, these files are only regenarated whenever the file you specify (the output of your language tools) is newer than the emulator absolute file and symbol data base. for more information, refer to the "using the hp 64869 format reader" section in appendix a. absolute file name for most formats, you enter the name of your absolute file in the last field. type cmd_rds.abs , and press enter to start the memory load. getting started 2-35
using symbols the following pages show you how to display global and local symbols for the sample program. for more information on symbol display, refer to the pc interface refernce . displaying global symbols when you load hp 64869 or hp64000 format absolute files into the emulator, the corresponding symbol database is also loaded. the symbols database can also be loaded with the " s ystem s ymbols g lobal l oad" command. this command is provided for situations where multiple absolute files are loaded into the emulator; it allows you to load the various sets of global symbols corresponding to the various absolute files. when global symbols are loaded into the emulator, information about previous global symbols is lost (that is, only one set of global symbols can be loaded at a time). after global symbols are loaded, both global and local symbols can be used when entering expressions. global symbols are entered as they appear in the source file or in the global symbols display. to display global symbols, select: s ystem, s ymbols, g lobal, d isplay the symbols window automatically becomes the active window as a result of this command. you can press z to zoom the window. the resulting display follows. 2-36 getting started
the global symbols display has two parts. the first parts lists all the modules that were linked to produce this object file. these module names are used by you when you want to refer to a local symbol, and are case-sensitive. the second part of the display lists all global symbols in this module. these names can be used in measurement specifications, and are case-snesitive. for example, if you wish to make a measurement using the symbol cmd_input , you must specify cmd_input . the strings cmd_input or cmd_input are not valid symbol names here. displaying local symbols to display local symbols, select: s ystem, s ymbols, l ocal, d isplay enter the name of the module you want to specify (from the first part of the global symbols display; in this case, cmd_rds ) and press enter . the resulting display follows. getting started 2-37
after you display local symbols with the ? s ystem s ymbols l ocal d isplay? command, you can enter local symbols as they appear in the source file or local symbol display. when you display local symbols for a given module, that module becomes the default local symbol module. if you have not displayed local symbols, you can still enter a local symbol by including the name of the module: module_name:symbol remember that the only valid module names are those listed in the first part of the global symbols display, and are case-sensitive for compatibility with other systems (such as hp-ux). when you include the name of an source file with a local symbol, that module becomes the default local symbol module, as with the ? s ystem s ymbols l ocal d isplay? command. local symbols must be from assembly modules that form the absolute whose symbol database is currently loaded. otherwise, no symbols will be found (even if the named assembler symbol file exists and contains information). 2-38 getting started
one thing to note: it is possible for a symbol to be local in one module and global in another, which may result in some confusion. for example, suppose symbol ?xyz? is a global in module a and a local in module b and that these modules link to form the absolute file. after you load the absolute file (and the corresponding symbol database), entering ?xyz? in an expression refers to the symbol from module a. then, if you display local symbols from module b, entering ?xyz? in an expression refers to the symbol from module b, not the global symbol . now, if you again want to enter ?xyz? to refer to the global symbol from module a, you must display the local symbols from module a (since the global symbol is also local to that module). loading local symbols from a third module, if it was linked with modules a and b and did not contain an?xyz? local symbol, would also cause ?xyz? to refer to the global symbol from module a. transfer symbols to the emulator you can use the emulator?s symbol-handling capability to improve measurement displays. you do this by transferring the symbol database information to the emulator. to transfer the global symbol information to the emulator, use the command: s ystem, s ymbols, g lobal, t ransfer transfer the local symbol information for all modules by entering: s ystem, s ymbols, l ocal, t ransfer, a ll you can find more information on emulator symbol handling commands in the emulator pc interface reference . getting started 2-39
displaying memory in mnemonic format once you have loaded a program into the emulator, you can verify that the program has indeed been loaded by displaying memory in mnemonic format. to do this, select: m emory, d isplay, m nemonic enter the address range "1000..1029". (you could also specify this address range using symbols, for example, "init..cmd_i" or "init..init+29" .) the emulation window automatically becomes the active window as a result of this command. you can press z to zoom the emulation window. the resulting display follows. if you wish to view the rest of the sample program memory locations,you can select " m emory d isplay m nemonic" command again and enter the range from "102a..1042". 2-40 getting started
stepping through the program the emulator allows you to execute one instruction or a number of instructions with step command. to begin stepping through the sample program, select: p rocessor, s tep, a ddress enter a step count of 1, enter the symbol init (defined as a global in the source file), and press enter to step from program?s first address, 1000 hex. the executed instruction, the program counter address, and the resulting register contents are displayed as shown in the following listing. getting started 2-41
note you cannot display registers if the processor is reset. use the " p rocessor b reak" command to cause the emulator to start executing in the monitor. you can display registers while the emulator is executing a user program (if execution is not restricted to real-time); emulator execution will temporarily break to the monitor. to continue stepping through the program, you can select: p rocessor, s tep, p c after selecting the command above, you have an opportunity to change the previous step count. if you wish to step the same number of times, you can press enter to start the step. to save time when single-stepping, you can use the function key macro , which executes the command, p rocessor, s tep, p c, 1 for more information, see the emulator pc interface reference manual. to repeat the previous command, you can press r . specifying a step count if you wish to continue to step a number of times from the current program counter, select: p rocessor, s tep, p c the previous step count is displayed in the "number of instructions" field. you can enter a number from 1 through 99 to specify the number of times to step. type 5 into the field, and press enter . the resulting display follows. 2-42 getting started
when you specify step counts greater than 1, only the last register contents are displayed. modifying memory the preceding step commands show the sample program is executing in the scan loop, where it continually reads the command input byte to check if a command has been entered. to simulate the entry of a sample program command, you can modify the command input byte by selecting: m emory, m odify, b yte now enter the address of the memory location to be modified, an equal sign, and new value of that location, for example, "cmd_input=41". (the cmd_input label was defined as a global symbol in the source file.) to verify that 41 hex was indeed written to cmd_input (fc00 hex), select: m emory, d isplay, b yte getting started 2-43
type the symbol cmd_input , and press enter . the resulting display is shown below. you can continue to step through the program as shown earlier in this chapter to view the instructions which are executed when an "a" (41 hex) command is entered. running the program to start the emulator executing the sample program, select: p rocessor, g o, p c the status line will show that the emulator is "running user program". 2-44 getting started
searching memory for data you can search the message destination locations to verify that the sample program writes the appropriate messages for the allowed commands. the command "a" (41 hex) was entered above, so the "command a entered" message should have been written to the msg_dest locations. because you must search for hexadecimal values, you will want to search for a sequence of characters which uniquely identify the message, for example, " a " or 20 hex, 41 hex, and 20 hex. to search the destination memory location for this sequence of characters, select: m emory, f ind enter the range of the memory locations to be searched, fc02 hex through fc21 hex, and enter the data 20 hex, 41 hex, and 20 hex. the resulting information in the memory window shows you that the message was indeed written as it was supposed to have been. to verify that the sample program works for the other allowed commands, you can modify the command input byte to "b" and search for " b " (20 hex, 42 hex, and 20 hex), or you can modify the command input byte to "c" and search for "d c" (64 hex, 20 hex, and 43 hex). breaking into the monitor to break emulator execution from the sample program to the monitor program, select: p rocessor, b reak the status line shows that the emulator is "running in monitor". while the break will occur as soon as possible, the actual stopping point may be many cycles after the break request (dependent on the type of instruction being executed and whether the processor is in a hold state). getting started 2-45
using software breakpoints software breakpoints are provided with one of h8/536 undefined opcode (1b hex) as breakpoint interrupt instruction. when you define or enable a software breakpoint, the emulator will replace the opcode at the software breakpoint address with the breakpoint interrupt instruction. when software breakpoints are enabled and emulator detects the breakpoint interrupt instruction (1b hex), it generates a break to background request which as with the "processor break" command. since the system controller knows the locations of defined software breakpoints, it can determine whether the breakpoint interrupt instruction (1b hex) is a software breakpoint or opcode in your target program. if it is a software breakpoint, execution breaks to the monitor, and the breakpoint interrupt instruction is replaced by the original opcode. a subsequent run or step command will execute from this address. if it is an opcode of your target program, execution still breaks to the monitor, and an "undefined software breakpoint" status message is displayed. when software breakpoints are disabled, the emulator replaces the breakpoint interrupt instruction with the original opcode. up to 32 software breakpoints may be defined. note you must set software breakpoints only at memory locations which contain instruction opcodes (not operands or data). if a software breakpoint is set at a memory location which is not an instruction opcode, the software breakpoint instruction will never be executed and the break will never occur. 2-46 getting started
note because software breakpoints are implemented by replacing opcodes with the undefined opcode (1b hex), you cannot define software breakpoints in target rom. you can, however, use the terminal interface cim command to copy target rom into emulation memory (see the terminal interface: user?s reference manual for information on the cim command). note software breakpoints should not be set, cleared, enabled, or disabled while the emulator is running user code. if any of these commands are entered while the emulator is running user code, and the emulator is executing code in the area where the breakpoint is being modified, program execution may be unreliable. defining a software breakpoint to define a breakpoint at the address of the cmd_i label of the sample program (1029 hex), select: b reakpoints, a dd enter the local symbol "cmd_i". after the breakpoint is added, the breakpoint window becomes active and shows that the breakpoint is set. you can add multiple breakpoints in a single command by separating each one with a semicolon. for example, you could type "1019;1021;1029" to set three breakpoints. getting started 2-47
run the program by selecting: p rocessor, g o, p c the status line shows that the emulator is running the user program. modify the command input byte to an invalid command by selecting: m emory, m odify, b ytes enter an invalid command, such as "cmd_input=75". the following messages result: alert: software breakpoint: 001029 status: h8/536--running in monitor to continue program execution, select: p rocessor, g o, p c displaying software breakpoints to view the status of the breakpoint, select: b reakpoints, d isplay the resulting display will show that the breakpoint has been cleared. setting a software breakpoint when a breakpoint is hit, it becomes disabled. to re-enable the software breakpoint, you can select: b reakpoints, s et, s ingle the address of the breakpoint you just added is still in the address field; to set this breakpoint again, press enter . as with the " b reakpoints a dd"command, the breakpoint window becomes active and shows that the breakpoint is set. clearing a software breakpoint if you wish to clear a software breakpoint that does not get hit during program execution, you can select: b reakpoints, c lear, s ingle the address of the breakpoint set in the previous section is still in the address field; to clear this breakpoint again, press enter . 2-48 getting started
using the analyzer the h8/536 emulation analyzer has 48 trace signals which monitor internal emulation lines (address, data, and status lines). optionally, you may have an additional 16 trace signals which monitor external input lines. the analyzer collects data at each pulse of a clock signal, and saves the data (a trace state) if it meets a "storage qualification" condition. note emulators which have the optional external analyzer will display the interna/external options after the commands in the following examples. enter internal to execute the examples. resetting the analysis specification to be sure that the analyzer is in its default or power-up state, select: a nalysis, t race, r eset specifying a simple trigger suppose you wish to trace the states of the sample program which follow the read of a "b" (42 hex) command from the command input byte. to do this, you must modify the default analysis specification by selecting: a nalysis, t race, m odify the emulation analysis specification is shown. use the right arrow key to move the cursor to the "trigger on" field. type "a" and press enter . you?ll enter the pattern expression menu. press the up arrow key until the addr field directly opposite the pattern a= is highlighted. type the address of the command input byte, using either the global symbol cmd_input or address 0fc00, and press enter . the "data" field is now highlighted. type 42xx and press enter . 42 is the value of the "b" command and the "x"s specify "don?t care" values. getting started 2-49
triggering the analyzer by data you may want to trigger the emulation analyzer when specific data appears on the data bus. you can accomplish this by specifying "data" in the "find state" field of analysis specification display. there are some points to be noticed when you trigger the analyzer in this way. you always need to specify the "data" with 16 bits value even when access to the data is performed by byte access. this is because the analyzer is designed so that it can capture data on internal data bus (which has 16 bits width). the following table shows the way to specify the trigger condition by data. (data read/write) ===================================================== | | available location of data | accesses | specification ===================================================== internal rom,ram | word | hhll *1 +----------+--------------------- | byte | ddxx *2 -------------------+----------+--------------------- others | ddxx ===================================================== (instruction fetch) ===================================================== | | available location of data | address | specification ===================================================== internal rom,ram | even | hhll *1 +----------+--------------------- | odd | xxdd *2 --------------------+----------+--------------------- others | ddxx *2 ===================================================== *1 hhll means 16 bits data *2 dd means 8 bits data for example, to trigger the analyzer when the processor performs word access to data 1234 hex in internal rom, you can use 1234h as the "data" specification. to trigger the analyzer when the processor accesses data 12 hex in external rom, you can use 12xxh as "data" specification. 2-50 getting started
h8/536 analysis status qualifiers now the "status" field is highlighted. use the tab key to view the status qualifiers which may be entered. the status qualifiers are defined as follows. qualifier status bits (36..47) description backgrnd 0xxx xxxx xxxxb background cycle brelease x111 xxxx xxxxb bus release cycle byte x110 xxxx xx1xb byte access cpu x110 xx1x xxxxb cpu cycle data x110 xxxx x1xxb data access dtc x110 xx0x xxxxb data transfer controller cycle exec x101 xxxx xxxxb instruction execution cycle fetch x110 xx1x x001b program fetch cycle foregrnd 1xxx xxxx xxxxb foreground cycle grd x110 0xx1 xxxxb guarded memory access intack x011 xxxx xxxxb interrupt acknowledge cycle io x110 xxx0 xxxxb internal i/o access memory x110 xxx1 xxxxb memory access read x110 xxxx xxx1b read cycle word x110 xxxx xx0xb word access write x110 xxxx xxx0b write cycle wrrom x110 x0x1 xxx0b write to rom cycle select the read status and press enter . figure 2-6 and 2-7 show the resulting analysis specification. to save the new specification, use end enter to exit the field in the lower right corner. you?ll return to the trace specification. press end to move to the trriger spec field. press enter to exit the trace specification. getting started 2-51
figure 2-6. modifying the trace specification figure 2-7. modifying the pattern specification 2-52 getting started
starting the trace to start the trace, select: a nalysis, b egin a message on the status line will show you that the trace is running. you do not expect the trigger to be found because no commands have been entered. modify the command input byte to "b" by selecting: m emory, m odify, b yte enter "cmd_input=42". the status line now shows that the trace is complete. displaying the trace to display the trace, select: a nalysis, d isplay you are now given two fields in which to specify the states to display. use the right arrow key to move the cursor to the "ending state to display" field. type "60" into the ending state field, press enter , and use z to zoom the trace window. note if you choose to dump a complete trace into the trace buffer, it will take a few minutes to display the trace. use the home key to get the top of the trace. the resulting trace is similar to the trace shown in the following display. getting started 2-53
line 0 in the trace list above shows the state which triggered the analyzer. the trigger state is always on line 0. the other states show the exit from the scan loop and the exe_cmd instructions. to list the next lines of the trace, press the pgdn or next key. 2-54 getting started
the resulting display shows the cmd_b instructions and the branch to write_msg and the beginning of the instructions which move the "this is message b" message to the destination locations. for a complete description for a complete description of using the hp 64700 series analyzer with the pc interface, refer to the hp 64700 emulators pc interface: analyzer user?s guide . using a command file you can use a command file to perform many functions for you, without having to manually type each function. for example, you might want to create a command file that modifies configuration, maps memory and loads program into memory for the sample program. to create such a command file: s ystem, l og, i nput, e nable enter command file name "cmd_rds.cmd", and press enter . this sets up a file to record all commands you execute. the commands will be logged to the file cmd_rds.cmd in the current directory. you can then use this file as a command file to execute these commands automatically. first, to set up the reset value for the stack pointer: c onfig, g eneral use the arrow keys to move the cursor to the "reset value for stack pointer" field, type 0fc80, and press end and enter . to map the memory: c onfig, m ap, m emory map 1000 hex through 1fff hex to erom and fc00 hex through fcff hex to eram . (as shown in figure 2-5.) to load the program into memory: m emory, l oad enter file format, memory type, and absolute file name, and press enter . now we?re finished logging commands to the file. to disable logging: getting started 2-55
s ystem, l og, i nput, d isable the command file cmd_rds.cmd will no longer accept command input. let?s execute the command file "cmd_rds.cmd". s ystem, c ommand_file enter "cmd_rds.cmd", press enter . as you can see, the sequence of commands you entered is automatically executed. resetting the emulator to reset the emulator, select: p rocessor, r eset, h old the emulator is held in a reset state (suspended) until a " p rocessor b reak", " p rocessor g o", or " p rocessor s tep" command is entered. a cmb execute signal will also cause the emulator to run if reset. you can also specify that the emulator begin executing in the monitor after reset instead of remaining in the suspended state. to do this, select: p rocessor, r eset, m onitor 2-56 getting started
exiting the pc interface there are two different ways to exit the pc interface. you can exit the pc interface using the "locked" option which specifies that the current configuration will be present next time you start up the pc interface. you can select this option as follows. s ystem, e xit, l ocked symbols are lost when you use the "system exit locked" command; however, you can reload them (after you reenter the pc interface) with the "system symbols global load" command. the other way to execute the pc interface is with the "unlocked" option which specifies that the default configuration will be present the next time you start up the pc interface. you can select this option with the following command. s ystem, e xit, u nlocked getting started 2-57
notes 2-58 getting started
3 in-circuit emulation many of the topics described in this chapter involve the commands which relate to using the emulator in-circuit, that is, connected to a target system. this chapter will: describe the issues concerning the installation of the emulator probe into target systems. show you how to install the emulator probe. we will cover the first topic in this chapter. for complete details on in-circuit emulation configuration, refer to the "configuring the emulator" chapter. prerequisites before performing the tasks described in this chapter, you should be familiar with how the emulator operates in general. refer to the hp 64700 emulators: system overview manual and the "getting started" chapter of this manual. in-circuit emulation 3-59
installing the target system probe the emulator probe has a plcc connector. the emulator is shipped with a pin guard over the target system probe. this guard is designed to prevent impact damage to the pins and should be left in place while you are not using the emulator. caution damage to the emulator circuitry may result if these precautions are not observed. the following precautions should be taken while using the h8/536 emulator. power down target system. turn off power to the user target system and to the h8/536 emulator before inserting the user plug to avoid circuit damage resulting from voltage transients or mis-insertion of the user plug. verify user plug orientation. make certain that pin 1 of the target system microprocessor socket and pin 1 of the user plug are properly aligned before inserting the user plug in the socket. failure to do so may result in damage to the emulator circuitry. protect against static discharge. the h8/536 emulator contains devices which are susceptible to damage by static discharge. therefore, operators should take precautionary measures before handling the user plug to avoid emulator damage. protect target system cmos components. if your target system includes any cmos components, turn on the target system first, then turn on the h8/536 emulator; when powering down, turn off the emulator first, then turn off power to the target system. 3-60 in-circuit emulation
installing into a plcc type socket to connect the microprocessor connector to the target system, proceeded with the following instructions. 1. remove the h8/536 microprocessor from the target system socket (plcc socket). note the location of pin 1 on the processor and on the target system socket. 2. store the microprocessor in a protected environment (such as antistatic foam). 3. install the target system probe into the target system microprocessor socket. figure 3-8. installing into a plcc type socket in-circuit emulation 3-61
note to make sure the contact between emulator probe and target system microprocessor socket, we recommend that you use itt cannon " lcs-84 " series 84 pin plcc socket. running the emulator from target reset you can specify that the emulator begins executing from target system reset. when the target system /res line becomes active and then inactive, the emulator will start reset sequence (operation) as actual microprocessor. at first, you must specify the emulator responds to /res signal by the target system (see the "enable /res input from target" configuration in chapter 4 of this manual). to specify a run from reset state, select: p rocessor, g o, r eset the status now shows that the emulator is "awaiting target reset". after the target system is reset, the status line message will change to show the appropriate emulator status. 3-62 in-circuit emulation
4 configuring the emulator introduction the h8/536 emulator can be used in all stages of target system development. for instance, you can run the emulator out-of-circuit when developing target system software, or you can use the emulator in-circuit when integrating software with target system hardware. emulation memory can be used in place of, or along with, target system memory. you can use the emulator?s internal clock or the target system clock. you can execute target programs in real-time or allow emulator execution to be diverted into the monitor when commands request access of target system resources (target system memory, register contents, etc.) the emulator is a flexible instrument and it may be configured to suit your needs at any stage of the development process. this chapter describes the options available when configuring the h8/536 emulator. this chapter will: show you how to access the emulator configuration options. describe the emulator configuration options. show you how to save a particular emulator configuration, and load it again at a later time. configuring the emulator 4-1
accessing the emulator configuration options to enter the general configuration menu, select: config, g eneral the general configuration menu appers as follows: when you position the cursor to a configuration item, a brief description of the item appears at the bottom of the display. note it is possible to use the system terminal window to modify the emulator configuration. however, if you do this, some pc interface features may no longer work properly. we recommend that you only modify the emulator configuration by using the options presented in the pc interface. figure 4-9. h8/536 general emulator configuration 4-2 configuring the emulator
internal emulator clock? this configuration question allows you to select the emulator?s clock source; you can choose either the internal clock source or the target system clock source. the default emulator configuration selects the internal clock. yes selects the internal clock oscillator as the emulator clock source. the emulators? internal clock speed is 10 mhz (system clock). no selects the clock input to the emulator probe from the target system. you must use a clock input conforming to the specifications for the h8/536 microprocessor. you should always select the external clock option when using the emulator in-circuit to ensure that the emulator is properly synchronized with your target system. note changing the clock source drives the emulator into the reset state. enable real-time mode? if it is important that the emulator execute target system programs in real-time, you can enable the real-time emulator mode. in other words, when you execute target programs (with the " p rocessor, g o" command), the emulator will execute in real-time. configuring the emulator 4-3
no the default emulator configuration disables the real-time mode. when the emulator is executing the target program, you are allowed to enter emulation commands that require access to target system resources (display/modify: registers or target system memory). if one of these commands is entered, the system controller will temporarily break emulator execution into the monitor. yes if your target system program requires real-time execution, you should enable the real-time mode in order to prevent temporary breaks that might cause target system problems. commands not allowed when real-time mode is enabled when emulator execution is restricted to real-time and the emulator is running user code, the system refuses all commands that require access to processor registers or target system memory. the following commands are not allowed when runs are restricted to real-time: register display/modification. target system memory display/modification. internal i/o registers display/modification. if the real-time mode is enabled, these resources can only be displayed or modified while running in the monitor. breaking out of real-time execution the only commands which are allowed to break real-time execution are: p rocessor, r eset p rocessor, g o p rocessor, b reak p rocessor, s tep 4-4 configuring the emulator
enable breaks on writes to rom? this question allows you to specify that the emulator break to the monitor upon attempts to write to memory space mapped as rom. the emulator will prevent the processor from actually writing to memory mapped as emulation rom; however, they cannot prevent writes to target system ram locations which are mapped as rom, even though the write to rom break is enabled. yes causes the emulator to break into the emulation monitor whenever the user program attempts to write to a memory region mapped as rom. no the emulator will not break to the monitor upon a write to rom. the emulator will not modify the memory location if it is in emulation rom. note the wrrom analysis specification status option allows you to use "write to rom" cycles as trigger and storage qualifiers. configuring the emulator 4-5
enable software breakpoints? when you define or enable a software breakpoint to a specified address, the emulator will replace the opcode with one of h8/536 undefined opcode (1b hex) as breakpoint interrupt instruction. when the emulator detects the breakpoint interrupt instruction (1b hex), user program breaks to the monitor, and the original opcode will be replaced at the software breakpoint address. a subsequent run or step command will execute from this address. refer to the "getting started" for information on using software breakpoints. no the software breakpoints feature is disabled. this is specified by the default emulator configuration, so you must change this configuration item before you can use software breakpoints. yes the software breakpoints feature is enabled. the emulator detects the breakpoint interrupt instruction (1b hex), it generates a break to background request which as with the "processor break" command. since the system controller knows the locations of defined software breakpoints, it can determine whether the breakpoint interrupt instruction (1b hex) is a software breakpoint or opcode in your target program. when you define (add) a breakpoint, software breakpoints are automatically enabled. 4-6 configuring the emulator
enable cmb interaction? coordinated measurements are measurements synchronously made in multiple emulators or analyzers. coordinated measurements can be made between hp 64700 series emulators which communicate over the coordinated measurement bus (cmb). multiple emulator start/stop is one type of coordinated measurement. the cmb signals ready and /execute are used to perform multiple emulator start/stop. this configuration item allows you to enable/disable interaction over the ready and /execute signals. (the third cmb signal, trigger, is unaffected by this configuration item.) no the emulator ignores the /execute and ready lines, and the ready line is not driven. yes multiple emulator start/stop is enabled. if the p rocessor, c mb, g o, ... command is entered, the emulator will start executing code when a pulse on the /execute line is received. the ready line is driven false while the emulator is running in the monitor; it goes true whenever execution switches to the user program. note cmb interaction will also be enabled when the processor, cmb, execute command is entered. configuring the emulator 4-7
enable bus arbitration? the bus arbitration configuration question defines how your emulator responds to bus request signals from the target system during foreground operation. the /breq signal from the target system is always ignored when the emulator is running the background monitor. yes when bus arbitration is enabled, the /breq (bus request) signal from the target system is responded to exactly as it would be if only the emulation processor was present without an emulator. in other words, if the emulation processor receives a /breq from the target system, it will respond by asserting /back and will set the various processor lines to tri-state. /breq is then released by the target; /back is negated by the processor, and the emulation processor restarts execution. note dma (direct memory access) devices is prohibited from accessing to emulation memory. no when you disable bus arbitration, the emulator ignores the /breq signal from the target system. the emulation processor will never drive the /back line true; nor will it place the address, data and control signals into the tri-state mode. enabling and disabling bus master arbitration can be useful to you in isolating target system problems. for example, you may have a situation where the processor never seems to execute any code. you can disable bus arbitration to check and see if faulty arbitration circuitry in your target system is contributing to the problem. 4-8 configuring the emulator
drive background cycles to target? this question allows you specify whether or not the emulator will drive the target system bus on background cycles. if you have selected to use a foreground monitor, emulator foreground monitor cycles will appear at the target interface exactly as if they were bus cycles caused by any target system program. yes specifies that background cycles are driven to the target system. emulation processor?s address and control strobes (except /wr) are driven during background cycles. background write cycles won?t appear to the target system. no background monitor cycles are not driven to the target system. when you select this option, the emulator will appear to the target system as if it is between bus cycles while it is operating in the background monitor. note changing this configuration drives the emulator into the reset state. configuring the emulator 4-9
enable nmi input from target? this configuration allows you to specify whether or not the emulator responds to nmi(non-maskable interrupt request) signal from the target system during foreground operation. yes the emulator will respond to the nmi request from the target system. no the emulator will not respond to the nmi request from the target system. if you are using the background monitor, the emulator does not accept any interrupt during background execution. all edge-sensed interrupts (include nmi) are latched last one during in background, and such interrupts will occur when context is changed to foreground. all level-sensed interrupts and internal interrupts are ignored during in background operation. note changing this configuration drives the emulator into the reset state. 4-10 configuring the emulator
enable /res input from target? this configuration allows you to specify whether or not the emulator responds to /res and /stby signals by the target system during foreground operation. while running the background monitor, the emulator ignores /res and /stby signals except that the emulator?s status is "awaiting target reset". yes the emulator will respond to /res and /stby input during foreground operation. no the emulator will not respond to /res and /stby input from the target system. note changing this configuration drives the emulator into the reset state. note if you specify that the emulator will drive the /res signal to the target system during emulation reset or by the overflow of watch dog timer, the emulator should be configured to respond to the /res input to the target system. configuring the emulator 4-11
drive emulation reset to target? this configuration allows you to select whether or not the emulator will drive the /res signal to the target system during emulation reset. no specifies that the emulator will not drive the /res signal during emulation reset. yes the emulator will drive an active level on the /res signal to the target system during emulation reset. this configuration option is meaningful only when the emulator is configured to respond to the /res input to the target system refer to the "enable /res input from target?" configuration in this chapter. trace bus release cycles? you can direct the emulator to send bus release cycle data to emulation analyzer or not to send it. yes when you enable tracing bus release cycles, bus release cycles will appear as one analysis trace line. no bus release cycles will not appear on analysis trace list (display). 4-12 configuring the emulator
processor type the configuration allows you to select processor to be emulated. 536 when you are going to emulate h8/536 microprocessor, select this item. 534 when you are going to emulate h8/534 microprocessor, select this item. note changing this configuration drives the emulator into the reset state. processor operation mode this configuration defines operation mode in which the emulator works. ext the emulator will work using the mode setting by the target system. the target system must supply appropriate input to md0, md1 and md2. if you are using the emulator out of circuit when "external" is selected, the emulator will operate in mode 7. when is selected, the emulator will operate in selected mode regardless of the mode setting by the target system. valid are following: description 1 the emulator will operate in mode 1. (expanded minimum mode) configuring the emulator 4-13
2 the emulator will operate in mode 2. (expanded minimum mode with internal rom) 3 the emulator will operate in mode 3. (expanded maximum mode) 4 the emulator will operate in mode 4. (expanded maximum mode with internal rom) 7 the emulator will operate in mode 7. (single chip mode) note changing this configuration drives the emulator into the reset state. monitor type bg specify monitor type as background monitor . when you select background monitor, configuration question of foreground monitor address have no effect to emulator?s operation. fg specify monitor type as foreground monitor . when you select foreground monitor, you must specify correct foreground monitor start address with next configuration question (foreground monitor address). after you completed the configuration setting, you need to load foreground monitor program to the emulator with "memory load" feature. the foreground monitor program must already assembled and linked with appropriate monitor start address specification. 4-14 configuring the emulator
to use the foreground monitor, follow below steps. 1. decide which location the foreground monitor should be loaded. 2. assemble and link the foreground monitor program along with the location you decided. 3. configure the emulator as described in this chapter. (monitor type selection and monitor location). 4. load the foreground monitor program into memory by " m emory l oad" feature. note changing this configuration drives the emulator into the reset state. foreground monitor address you must specify foreground monitor start address when you select "fg" by above configuration question "monitor type". this address specification must be same with the address specification when you assemble the foreground monitor program. the address must be specified in a 20-bit hexadecimal address, and must be located on a 2k byte boundary other than 0 hex. configuring the emulator 4-15
reset value for stack pointer? this question allows you to specify the value to which the stack pointer (sp) and the stack page register (tp) will be set on entrance to the emulation monitor initiated reset state (the "emulation reset" status). the address specified in response to this question must be a 20-bit hexadecimal even address. you cannot set this address at the following location. odd address internal i/o register address when you are using the foreground monitor, this address should be defined in an emulation or target system ram area which is not used by user program. note we recommend that you use this method of configuring the stack pointer and the stack page register. without a stack pointer and a stack page register, the emulator is unable to make the transition to the run state, step, or perform many other emulation functions. however, using this option does not preclude you from changing the stack pointer value or location within your program; it just sets the initial conditions to allow a run to begin. 4-16 configuring the emulator
storing an emulator configuration the pc interface lets you store a particular emulator configuration so that it may be re-loaded later. the following information is saved in the emulator configuration. emulator configuration items. memory map. break conditions. trigger configuration. window specifications. to store the current emulator configuration, select: c onfig, s tore enter the name of file to which the emulator configuration will be saved. loading an emulator configuration if you have previously stored an emulator configuration and wish to re-load it into the emulator, select: c onfig, l oad enter the configuration file name and press enter . the emulator will be re-configured with the values specified in the configuration file. configuring the emulator 4-17
notes 4-18 configuring the emulator
5 using the emulator introduction in the "getting started" chapter, you learned how to load code into the emulator, how to modify memory and view a register, and how to perform a simple analyzer measurement. in this chapter, we will discuss in more detail other features of the emulator. this chapter shows you how to: making coordinated measurements. store the contents of memory into absolute files. this chapter also discusses: display or modify registers. using the emulator 5-1
making coordinated measurements coordinated measurements are measurements synchronously made in multiple emulators or analyzers. coordinated measurements can be made between hp 64700 series emulators which communicate over the coordinated measurement bus (cmb). coordinated measurements can also be made between an emulator and some other instrument connected to the bnc connector. this section will describe coordinated measurements made from the pc interface which involve the emulator. these types of coordinated measurements are: running the emulator on reception of the cmb /execute signal. using the analyzer trigger to break emulator execution into the monitor. note you must use the background emulation monitor to perform coordinated measurements. three signal lines on the cmb are active and serve the following functions when enabled: /trigger active low. the analyzer trigger line on the cmb and on the bnc serve the same logical purpose. they provide a means for the analyzer to drive its trigger signal out of the system or for external trigger signals to arm the analyzer or break the emulator into its monitor. ready active high. this line is for synchronized, multi-emulator start and stop. when cmb run control interaction is enabled, all emulators are required to break to background upon reception of a false ready signal and will not return to foreground until this line is known to be in a true state. 5-2 using the emulator
/execute active low. this line serves as a global interrupt signal. upon reception of an enabled /execute signal, each emulator is to interrupt whatever it is doing and execute a previously defined process, typically, run the emulator or start a trace measurement. running the emulator at /execute before you can specify that the emulator run upon receipt of the /execute signal, you must enable cmb interaction. to do this, select: c onfig, g eneral use the arrow keys to move the cursor to the "enable cmb interaction? [n]" question, and type "y". use the enter key to exit out of the lower right-hand field in the configuration display. to specify that the emulator begin executing a program upon reception of the /execute signal, select: p rocessor, c mb, g o at this point you may either select the current program counter, or you may select a specific address. the command you enter is saved and is executed when the /execute signal becomes active. also, you will see the message "alert: cmb execute; run started". breaking on the analyzer trigger to cause emulator execution to break into the monitor when the analyzer trigger condition is found, you must modify the trigger configuration. to access the trigger configuration, select: c onfig, t rigger the trigger configuration display contains two diagrams, one for each of the internal trig1 and trig2 signals. using the emulator 5-3
to use the internal trig1 signal to connect the analyzer trigger to the emulator break line, move the cursor to the highlighted "analyzer" field in the trig1 portion of the display, and use the tab key to select the "----->>" arrow which shows that the analyzer is driving trig1. next, move the cursor to the highlighted "emulator" field and use the tab key to select the arrow pointing towards the emulator (<<-----); this specifies that emulator execution will break into the monitor when the trig1 signal is driven. the trigger configuration display is shown in figure 5-1. note if your emulator is configured with external analyzer, "timing" cross trigger options are displayed. figure 5-1. cross trigger configuration 5-4 using the emulator
storing memory contents to an absolute file the "getting started" chapter shows you how to load absolute files into emulation or target system memory. you can also store emulation or target system memory to an absolute file with the following command. m emory, s tore note the first character of the absolute file name must be a letter. you can name the absolute file with a total of 8 alphanumeric characters, and optionally, you can include an extension of up to 3 alphanumeric characters. caution the "memory store" command writes over an existing file if it has the same name that is specified with the command. you may wish to verify beforehand that the specified filename does not already exist. accessing target system with e clock synchronous instruction you can access target system devices in synchronization with the e clock. to do this, use the following commands: p rocessor, i o, d isplay p rocessor, i o, m odify the emulator will access the device using the movfpe/movtpe instruction. using the emulator 5-5
register names and classes the following register names and classes may be used with " r egister d isplay/ m odify" commands. summary h8/536 register designators. all available register class names and register names are listed below. * (basic) class register name description pc cp sr dp ep tp br r0 r1 r2 r3 r4 r5 r6 r7 r7 fp sp mdcr program counter code page register status register data page register extended page register stack page register base register register r0 register r1 register r2 register r3 register r4 register r5 register r6 register r6 register r7 frame pointer stack pointer mode control register 5-6 using the emulator
sys class system control registers register name description wcr ramcr mdcr sbycr wait control register ram control register mode control register software stand-by control register intc class interrupt control registers ipra iprab iprc iprd ipre iprf interrupt priority register a interrupt priority register b interrupt priority register c interrupt priority register d interrupt priority register e interrupt priority register f dtc class data transfer controller registers dtea dteb dtec dted dtee dtef dt enable register a dt enable register b dt enable register c dt enable register d dt enable register e dt enable register f using the emulator 5-7
port class i/o port registers register name description p1ddr p2ddr p3ddr p4ddr p5ddr p6ddr p7ddr p9ddr p1dr p2dr p3dr p4dr p5dr p6dr p7dr p8dr p9dr p1cr p69cr port 1 data direction register port 2 data direction register port 3 data direction register port 4 data direction register port 5 data direction register port 6 data direction register port 7 data direction register port 9 data direction register port 1 data register port 2 data register port 3 data register port 4 data register port 5 data register port 6 data register port 7 data register port 8 data register port 9 data register port 1 control register port 69 control register frt1 class free running timer 1 registers frtcr1 frtcsr1 frc1 ocra1 ocrb1 icr1 timer control register timer control/status register free running counter output compare register a output compare register b input capture register 5-8 using the emulator
frt2 class free running timer 2 registers register name description frtcr2 frtcsr2 frc2 ocra2 ocrb2 icr2 timer control register timer control/status register free running counter output compare register a output compare register b input capture register frt3 class free running timer 3 registers frtcr3 frtcsr3 frc3 ocra3 ocrb3 icr3 timer control register timer control/status register free running counter output compare register a output compare register b input capture register tmr class timer registers tcr tcsr tcora tcorb tcnt timer control register timer control/status register timer constant register a timer constant register b timer counter pwm1 class pwm timer1 registers pwmtcr1 dtr1 pwmtcnt1 timer control register duty register timer counter using the emulator 5-9
pwm2 class pwm timer2 registers register name description pwmtcr2 dtr2 pwmtcnt2 timer control register duty register timer counter pwm3 class pwm timer3 registers pwmtcr3 dtr3 pwmtcnt3 timer control register duty register timer counter wdt class watchdog timer registers wdtcsr wdtcnt rstcsr timer control/status register timer counter reset control/status register sci1 class serial communication interface 1 registers. rdr1 tdr1 smr1 scr1 ssr1 brr1 receive data register transmit data register serial mode register serial control register serial status register bit rate register 5-10 using the emulator
sci2 class serial communication interface 2 registers. register name description rdr2 tdr2 smr2 scr2 ssr2 brr2 receive data register transmit data register serial mode register serial control register serial status register bit rate register adc class a/d converter registers register name description addra addrb addrc addrd adcsr adcr a/d data register a a/d data register b a/d data register d a/d data register d a/d control/status register a/d control register using the emulator 5-11
notes 5-12 using the emulator
a file format readers using the hp 64000 reader an hp 64000 ?reader? is provided with the pc interface. the hp 64000 reader converts the files into two files that are usable with your emulator. this means that you can use available language tools to create hp 64000 absolute files, then load those files into the emulator using the pc interface. the hp 64000 reader can operate from within the pc interface or as a separate process. when operating the hp 64000 reader, it may be necessary to execute it as a separate process if there is not enough memory on your personal computer to operate the pc interface and hp 64000 reader simultaneously. you can also operate the reader as part of a ?make file.? what the reader accomplishes using the hp 64000 files (, , , , ...) the hp 64000 reader will produce two new files, an ?absolute? file and an ascii symbol file, that will be used by the pc interface. these new files are named: ?.hpa? and ?.hps.? the absolute file during execution of the hp 64000 reader, an absolute file (.hpa) is created. this absolute file is a binary memory image which is optimized for efficient downloading into the emulator. the ascii symbol file the ascii symbol file (.hps) produced by the hp 64000 reader contains global symbols, module names, local symbols, and, when using applicable development tools such as a ?c? compiler, program file format readers a-1
line numbers. local symbols evaluate to a fixed (static, not stack relative) address. note you must use the required options for your specific language tools to include symbolic (?debug?) information in the hp 64000 symbol files. the hp 64000 reader will only convert symbol information present in the hp 64000 symbol files (, , , ...). the symbol file contains symbol and address information in the following form: module_name1 module_name2 ... module_namen global_symbol1 address global_symbol2 address ... global_symboln address |module_name1|# 1234 address |module_name1|local_symbol1 address |module_name1|local_symbol2 address ... |module_name1|local_symboln address each of the symbols is sorted alphabetically in the order: module names, global symbols, and local symbols. line numbers will appear similar to a local symbol except that ?local_symbolx? will be replaced by ?#nnnnn? where nnnnn is a five digit decimal line number. the addresses associated with global and local symbols are specific to the processor for which the hp 64000 files were generated. note when the line number symbol is displayed in the emulator, it appears in brackets. therefore, the symbol ?modname: line 345? will be displayed as ?modname:[345]? in mnemonic memory and trace list displays. a-2 file format readers
the space preceding module names is required. although formatted for readability here, a single tab separates symbol and address. the local symbols are scoped. this means that to access a variable named ?count? in a source file module named ?main.c,? you would enter ?main.c:count? as shown below. module name variable name you enter: main.c count main.c:count main.c line number 23 main.c: line 23 you access line number symbols by entering the following on one line in the order shown: module name colon (:) space the word ?line? space the decimal line number for example: main.c: line 23 location of the hp 64000 reader program the hp 64000 reader is located in the directory named \hp64700\bin by default, along with the pc interface. this directory must be in the environment variable path for the hp 64000 reader and pc interface to operate properly. the path is usually defined in the ?\autoexec.bat? file. the following examples assume that you have ?\hp64000\bin? included in your path variable. if not, you must supply the directory name when executing the reader program. file format readers a-3
using the reader from ms-dos the command name for the hp 64000 reader is rhp64000.exe . to execute the reader from the command line, for example, enter: rhp64000 [-q] -q this option specifies the ?quiet? mode, and suppresses the display of messages. this represents the name of the hp 64000 linker symbol file (file.l) for the absolute file to be loaded. the following command will create the files ?testprog.hpa? and ?testprog.hps? rhp64000 testprog.l using the reader from the pc interface the pc interface has a file format option under the ? m emory l oad? command. after you select hp64000 as the file format, the hp 64000 reader will operate on the file you specify. after this completes successfully, the pc interface will accept the absolute and symbol files produced by the reader. to use the reader from the pc interface: 1. start up the pc interface. 2. select ? m emory l oad.? the memory load menu will appear. 3. specify the file format as ?hp64000.? this will appear as the default file format. 4. specify the name of an hp 64000 linker symbol file (testfile.l for example). using the hp 64000 file that you specify (testfile.l, for example), the pc interface performs the following: it checks to see if two files with the same base name and extensions .hps and .hpa already exist (for example, testfile.hps and testfile.hpa). a-4 file format readers
if testfile.hps and testfile.hpa don?t exist, the hp 64000 reader produces them. the new absolute file, testfile.hpa, is then loaded into the emulator. if testfile.hps and testfile.hpa already exist but the create dates and times are earlier than the hp 64000 linker symbol file creation date/time, the hp 64000 reader recreates them. the new absolute file, testfile.hpa, is then loaded into the emulator. if testfile.hps and testfile.hpa already exist but the dates and times are later than the creation date and time for the hp 64000 linker symbol file, the hp 64000 reader will not recreate testfile.hpa. the current absolute file, testfile.hpa, is then loaded into the emulator. note date/time checking is only done within the pc interface. when running the hp 64000 reader at the ms-dos command line prompt, the hp 64000 reader will always update the absolute and symbol files. when the hp 64000 reader operates on a file, a status message will be displayed indicating that it is reading an hp 64000 file. when the hp 64000 reader completes its processing, another message will be displayed indicating the absolute file is being loaded. if the reader won?t run if your program is very large, the pc interface may run out of memory while attempting to create the database file. if this occurs, you will need to exit the pc interface and execute the program at the ms-dos command prompt to create the files that are downloaded to the emulator. file format readers a-5
including rhp64000 in a make file you may wish to incorporate the ?rhp64000? process as the last step in your ?make file,? as a step in your construction process, to eliminate the possibility of having to exit the pc interface due to space limitations describe above. if the files with ?.hpa? and ?.hps? extensions are not current, loading an hp 64000 file will automatically create them. using the hp 64869 reader a hp 64869 format "reader" is provided with the pc interface. the hp 64869 reader converts a hp 64869 format file into two files that are usable with the hp 64739 emulator. this means you can use available language tools to create hp 64869 format absolute files, then load those files into the emulator using the h8/536 pc interface. the hp 64869 reader can operate from within the pc interface or as a separate process. operation from within the pc interface is available if there is enough memory on your personal computer to run the pc interface and hp 64869 reader simultaneously. you can also run the reader as part of a "make file." what the reader accomplishes using any hp 64869 format absolute file in the form ".", the hp 64869 reader will produce two new files, an "absolute" file and an ascii symbol file, that will be used by the h8/536 pc interface. the absolute file during execution of the hp 64869 reader, an absolute file (.hpa) is created. this absolute file is a binary memory image which is optimized for efficient downloading into the emulator. the ascii symbol file the ascii symbol file (.hps) produced by the hp 64869 reader contains global symbols, module names, local symbols, and, when using applicable development tools like a "c" compiler, program line a-6 file format readers
numbers. local symbols evaluate to a fixed (static, not stack relative) address. note you must use the required options for you specific language tools to include symbolic ("debug") information in the hp 64869 format absolute file. the symbol file contains symbol and address information in the following form: module_name1 module_name2 ... module_namen global_symbol1 address global_symbol2 address ... global_symboln address |module_name|local_symbol1 address |module_name|local_symbol2 address ... |module_name|local_symboln address |module_name|# 1234 address each of the symbols is sorted alphabetically in the order: module names, global symbols, and local symbols. line numbers will appear similar to a local symbol except that "local_symbolx" will be replaced by "#nnnnn" where nnnnn is a five digit decimal line number. line numbers should appear in ascending order in both the line number itself and its associated address. note when the line number symbol is displayed in the emulator, it appears as a bracketed number. therefore, the symbol "modname:# 345" will be displayed as "modname:[345]" in mnemonic memory and trace list displays file format readers a-7
the space preceding module names is required. although formatted for readability here, a single tab separates symbol and address. the local symbols are scoped. when accessing the variable named "count" in the source file module named "main.c", you would enter "main:count". notice that the module name of the source file "main.c" is "main". see the following table. module name variable name you enter: main count main:count main line number 23 main: line 23 location of the hp 64869 reader program the hp 64869 reader is located in the directory named \hp64700\bin by default, along with the pc interface. this directory must be in the environment variable path for the hp 64869 reader and pc interface to operate properly. this is usually defined in "\autoexec.bat" file. using the hp 64869 reader from ms-dos the command name for the hp 64869 reader is rd64869.exe . you can execute the hp 64869 reader from the command line with the command: c:\hp64700\bin\rd64869 [-q] where: [-q] specifies the "quiet" mode. this option suppresses the display of messages. is the name of the file containing the hp 64869 format absolute program. the command c:\hp64700\bin\rd64869 testprog.abs will therefore create the files "testprog.hpa" and "testprog.hps". a-8 file format readers
using the hp 64869 reader from the pc interface the h8/536 pc interface has a file format option under the " m emory, l oad" command. after you select this option, the hp 64869 reader will operate on the file you specify. after this completes successfully, the h8/536 pc interface will accept the absolute and symbol files produced by the reader. to use the reader from the pc interface, follow these steps: 1. start up the h8/536 pc interface. 2. select " m emory, l oad". the memory load menu will appear. 3. specify the file format as "hp64869". this will appear as the default file format. 4. specify a file in hp 64869 format ("testfile.abs", for example, ). the file extension can be something other than ".abs", but cannot be ".hpa", ".hpt", or ".hps". note the ".hpt" file is a temporary file used by the hp 64869 reader to process the symbols. using the hp 64869 format file that you specify (testfile.abs, for example), the pc interface performs the following: checks to see if two files with the same base name and extensions .hps and .hpa already exist (for example, testfile.hps and testfile.hpa). if testfile.hps and testfile.hpa don?t exist, the hp 64869 reader produces them. the new absolute file, testfile.hpa, is then loaded into the emulator. if testfile.hps and testfile.hpa already exist but the create dates and times are earlier than the hp 64869 format file creation date/time, the hp 64869 reader recreates them. the new absolute file, testfile.hpa, is then loaded into the emulator. file format readers a-9
if testfile.hps and testfile.hpa already exist but the dates and times are later than the creation date/time for the hp 64869 format file, the current absolute file, testfile.hpa, is then loaded into the emulator. note date/time checking is only done within the pc interface. when running the hp 64869 reader at the ms-dos command line prompt, the hp 64869 reader will always update the absolute and symbol files. when the hp 64869 reader operates on a file, a status message will be displayed indicating that it is reading a hp 64869 format file. when the hp 64869 reader completes its processing, another message will be displayed indicating the absolute file is being loaded. if the reader won?t run if your program is very large, then the pc interface may run out of memory while attempting to create the database file used. if this condition occurs, you will need to exit the pc interface and execute the program at the command prompt to create the files that are downloaded to the emulator. including rd64869 in a make file you may wish to incorporate the "rd64869" process as the last step in your "make" file, or as a step in your construction process, so as to eliminate the possibility of having to exit the pc interface due to space limitations describe above. if the "-.hpa" and "-.hps" files are not current, the process of loading an hp 64869 format file will automatically create them. a-10 file format readers
index ! .hpa file 2-13 .hps file 2-13 a absolute files .hpa created by hp 64869 reader a-6 .hpa created by hp 64000 reader a-1 loading 2-12 storing 5-5 analysis begin 2-31 analysis display 2-31 analysis specification resetting the 2-27 saving 2-31 trigger condition 2-27 triggering by data 2-28 analyzer status qualifiers 2-29 triggering by data 2-28 using the 2-27 ascii symbol file (.hps) a-1 ascii symbol files .hps created by hp 64769 reader a-6 assemblers 2-9 assembling the getting started sample program 2-6 b bnc connector 5-2 break command 2-20, 2-23, 2-34 break conditions 4-17 breakpoint interrupt instruction software breakpoints 2-24 breakpoints software 2-24 breaks 1-5 guarded memory accesses 2-9 on analyzer trigger 5-3 software breakpoints 1-5 write to rom 4-5 index-41
writes to rom 2-9 bus arbitration using configuration to isolate target problem 4-8 c cautions filenames in the memory store command 5-5 installing the target system probe 3-2 characterization of memory 2-9 cim, terminal interface command 2-25 clock source external 4-3 internal 4-3 clock source selection, emulator configuration 4-3 cmb (coordinated measurement bus) 5-2 enabling interaction 4-7 execute signal while emulator is reset 2-34 signals 5-2 command file creating and using 2-33 commands (pc interface), selecting 2-8 configuration for sample program 2-8 reset value for stack pointer 2-8 configuration (emulator) accessing 4-2 background cycles to target 4-9 break processor on write to rom 4-5 clock selection 4-3 enable cmb interaction 4-7 enable nmi input 4-10 enable software breakpoints 4-6 enabling real-time runs 4-3 honor target reset 4-11 loading 4-17 monitor type) 4-14 processor mode 4-13 stack pointer 4-16 storing 4-17 configuration(hardware), installing the emulator 2-2 coordinated measurements break on analyzer trigger 5-3 definition 5-2 42-index
multiple emulator start/stop 4-7 run at /execute 5-3 count, step command 2-20 d device table, emulator 2-7 display command registers 5-6 displaying the trace 2-31 e e clock) 5-5 emulation memory ram and rom 2-9 size of 2-9 emulator before using 2-2 device table 2-7 dma support 1-6, 4-8 features of 1-3 limitations 1-6 memory mapper resolution 2-9 prerequisites 2-2 purpose of 1-1 reset 2-34 running from target reset 3-4 sleep mode 1-6 software stand-by mode 1-6 status 2-8 target system 1-5 watch-dog timer 1-6 emulator configuration bus arbitration 4-8 emulator features analyzer 1-5 clock speeds 1-3 emulation memory 1-4 supported microprocessors 1-3 emulator limitations ram enable bit 1-6 enable real-time runs emulator configuration 4-3 eram, memory characterization 2-9 erom, memory characterization 2-9 index-43
execute cmb signal 5-3 run at 5-3 executing programs 2-22 exiting the pc interface 2-35 external clock source 4-3 f features of the emulator 1-3 file format hp 64869 a-6 file formats hp64000 a-4 find data in memory 2-23 foreground monitor address 4-15 function codes memory mapping 2-9 function key macro 2-20 g getting started prerequisites 2-2 global symbols 2-14, 2-19 grd, memory characterization 2-9 guarded memory accesses 2-9 h hardware installation 2-2 hp 64000 reader a-1 using with pc interface a-4 hp 64000 reader command (rhp64000.exe) a-3 hp 64869 format 2-13 loading 2-13 hp 64869 reader a-6 using with pc interface a-8 hp 64869 reader command (rd64869.exe) a-8 hp64000 file format a-4 hp64000 format 2-13 hptables environment variable 2-7 i in-circuit emulation 3-1, 4-1 installation hardware 2-2 software 2-2 installing target system probe seetarget system probe 44-index
internal clock source 4-3 internal i/o register display/modify 5-6 interrupt nmi 4-10 l limitations of the emulator 1-6 line numbers 2-32 link the sample program 2-6 linkers 2-9 load map 2-9 loading absolute files 2-12 local symbols 2-15, 2-25, a-3, a-7 location of foreground monitor 4-15 locked, pc interface exit option 2-35 logging of commands 2-33 m macro 2-20 make file a-1, a-6 mapping memory 2-9 memory displaying in mnemonic format 2-18 mapping 2-9 modifying 2-21 re-assignment of emulation memory blocks 2-12 searching for data 2-23 memory characterization 2-9 memory mapping function codes 2-9 ranges, maximum 2-9 monitor type 4-14 movfpe instruction 5-5 movtpe instruction 5-5 n non-maskable interrupt 4-10 notes "timing" option only with external analyzer 5-4 absolute file names for stored memory 5-5 changing clock source forces reset 4-3 cmb interaction enabled on execute command 4-7 config. option for reset stack pointer recommended 4-16 date checking only in pc interface a-5, a-10 displaying complete traces 2-31 dma to emulation memory not supported 4-8 index-45
internal memory must be assigned as emulation memory 2-9 re-assignment of emul. mem. blocks by mapper 2-12 register command 2-20 setting software bkpts. while running user code 2-25 software breakpoint locations 2-24 software breakpoints and rom code 2-25 terminal window to modify emul. config. 4-2 use required options to include symbols a-2, a-7 write to rom analyzer status 4-5 o out-of-circuit emulation 4-1 p pc interface exiting the 2-35 hp 64000 reader a-4 hp 64869 reader a-8 selecting commands 2-8 starting the 2-7 pin guard target system probe 3-2 plcc socket connect to the target system 3-3 predefining stack pointer 4-16 prerequisites for getting started 2-2 processor operation mode 4-13 purpose of the emulator 1-1 q qualifiers, analyzer status 2-29 r ram, mapping emulation or target 2-9 raw hp64000 format 2-13 reader rd64869 a-6 ready, cmb signal 5-2 real-time execution commands not allowed during 4-4 commands which will cause break 4-4 real-time operation 1-6 real-time runs 4-3 register display/modify 2-20 registers 1-5, 5-6 relocatable files 2-9 reset 2-34 46-index
reset (emulator) running from target reset 3-4 reset(emulator) 1-6 resetting the analyzer specifications 2-27 rom mapping emulation or target 2-9 writes to 2-9 run at /execute 5-3 run from target reset 3-4 running programs 2-22 s sample program, linking 2-6 sample programs for getting started 2-2 saving analysis specifications 2-31 searching for data in memory 2-23 selecting pc interface commands 2-8 simple trigger, specifying 2-27 single-step 1-5 software breakpoint h8/536 breakpoint interrupt instruction 4-6 software breakpoints 1-5, 2-24 clearing 2-26 defining (adding) 2-25 displaying 2-26 enabling 4-6 setting 2-26 software installation 2-2 specifications seeanalysis specification stack pointer reset value 2-8 stack pointer,defining 4-16 starting the trace 2-31 status (analyzer) qualifiers 2-29 status line 2-8 status qualifiers, h8/536/520 2-29 step 2-19 count specification 2-20 supervisor stack pointer required for proper operation 4-16 symbols 2-14 index-47
.hps file format a-2, a-7 global 2-19 local 2-25, a-1, a-6 t target reset running from 3-4 target system probe cautions for installation 3-2 installation 3-2 installation procedure 3-3 pin guard 3-2 target system ram and rom 2-9 trace analyzer signals 2-27 description of listing 2-32 displaying the 2-31 starting the 2-31 tram, memory characterization 2-9 trig1, trig2 internal signals 5-3 trigger 2-27 breaking into monitor on 5-3 specifying a simple 2-27 trigger state 2-32 trigger, cmb signal 5-2 trom, memory characterization 2-9 u undefined software breakpoint 2-24 unlocked, pc interface exit option 2-35 using the hp 64000 file reader a-1 v visible background cycles 4-9 w write to rom break 4-5 z zoom, window 2-14, 2-18 48-index


▲Up To Search▲   

 
Price & Availability of H8536

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X